3.25 \(\int \frac{\sin ^3(x)}{a+b \cos (x)} \, dx\)

Optimal. Leaf size=40 \[ \frac{\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}-\frac{a \cos (x)}{b^2}+\frac{\cos ^2(x)}{2 b} \]

[Out]

-((a*Cos[x])/b^2) + Cos[x]^2/(2*b) + ((a^2 - b^2)*Log[a + b*Cos[x]])/b^3

________________________________________________________________________________________

Rubi [A]  time = 0.06125, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2668, 697} \[ \frac{\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}-\frac{a \cos (x)}{b^2}+\frac{\cos ^2(x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]^3/(a + b*Cos[x]),x]

[Out]

-((a*Cos[x])/b^2) + Cos[x]^2/(2*b) + ((a^2 - b^2)*Log[a + b*Cos[x]])/b^3

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sin ^3(x)}{a+b \cos (x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b^2-x^2}{a+x} \, dx,x,b \cos (x)\right )}{b^3}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a-x+\frac{-a^2+b^2}{a+x}\right ) \, dx,x,b \cos (x)\right )}{b^3}\\ &=-\frac{a \cos (x)}{b^2}+\frac{\cos ^2(x)}{2 b}+\frac{\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}\\ \end{align*}

Mathematica [A]  time = 0.0573246, size = 40, normalized size = 1. \[ \frac{\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}-\frac{a \cos (x)}{b^2}+\frac{\cos (2 x)}{4 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^3/(a + b*Cos[x]),x]

[Out]

-((a*Cos[x])/b^2) + Cos[2*x]/(4*b) + ((a^2 - b^2)*Log[a + b*Cos[x]])/b^3

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 45, normalized size = 1.1 \begin{align*}{\frac{ \left ( \cos \left ( x \right ) \right ) ^{2}}{2\,b}}-{\frac{a\cos \left ( x \right ) }{{b}^{2}}}+{\frac{\ln \left ( a+b\cos \left ( x \right ) \right ){a}^{2}}{{b}^{3}}}-{\frac{\ln \left ( a+b\cos \left ( x \right ) \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^3/(a+b*cos(x)),x)

[Out]

1/2*cos(x)^2/b-a*cos(x)/b^2+1/b^3*ln(a+b*cos(x))*a^2-ln(a+b*cos(x))/b

________________________________________________________________________________________

Maxima [A]  time = 1.52093, size = 51, normalized size = 1.27 \begin{align*} \frac{b \cos \left (x\right )^{2} - 2 \, a \cos \left (x\right )}{2 \, b^{2}} + \frac{{\left (a^{2} - b^{2}\right )} \log \left (b \cos \left (x\right ) + a\right )}{b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)),x, algorithm="maxima")

[Out]

1/2*(b*cos(x)^2 - 2*a*cos(x))/b^2 + (a^2 - b^2)*log(b*cos(x) + a)/b^3

________________________________________________________________________________________

Fricas [A]  time = 1.69147, size = 100, normalized size = 2.5 \begin{align*} \frac{b^{2} \cos \left (x\right )^{2} - 2 \, a b \cos \left (x\right ) + 2 \,{\left (a^{2} - b^{2}\right )} \log \left (-b \cos \left (x\right ) - a\right )}{2 \, b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)),x, algorithm="fricas")

[Out]

1/2*(b^2*cos(x)^2 - 2*a*b*cos(x) + 2*(a^2 - b^2)*log(-b*cos(x) - a))/b^3

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**3/(a+b*cos(x)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.17596, size = 53, normalized size = 1.32 \begin{align*} \frac{b \cos \left (x\right )^{2} - 2 \, a \cos \left (x\right )}{2 \, b^{2}} + \frac{{\left (a^{2} - b^{2}\right )} \log \left ({\left | b \cos \left (x\right ) + a \right |}\right )}{b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)),x, algorithm="giac")

[Out]

1/2*(b*cos(x)^2 - 2*a*cos(x))/b^2 + (a^2 - b^2)*log(abs(b*cos(x) + a))/b^3